Skip to content

Remove agent name pattern validation#231

Merged
Paveltarno merged 3 commits intomainfrom
remove-agent-name-pattern-validation
Feb 15, 2026
Merged

Remove agent name pattern validation#231
Paveltarno merged 3 commits intomainfrom
remove-agent-name-pattern-validation

Conversation

@Paveltarno
Copy link
Collaborator

@Paveltarno Paveltarno commented Feb 11, 2026

Note

Description

This PR removes strict agent name validation and adds filesystem-safe filename generation. Previously, the CLI only accepted lowercase alphanumeric names with underscores (^[a-z0-9_]+$), but agents created via the AI builder can have names with uppercase letters, spaces, dashes, and other characters. This change allows any valid name while ensuring filesystem compatibility by converting names to safe slugs for file storage.

Related Issue

Companion to base44-dev/apper#3610 (server-side change)

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Other (please describe):

Changes Made

  • Removed /^[a-z0-9_]+$/ regex validation from AgentConfigSchema - now allows any non-empty name (1-100 chars)
  • Added toFileSlug() function to convert agent names to filesystem-safe filenames (lowercase, alphanumeric + underscores)
  • Updated writeAgents() to use slugified filenames when writing/deleting agent config files
  • Updated comment in generateAgentConfigContent() to remove outdated naming constraint note
  • Updated test fixture to test empty name validation (the only remaining constraint)

Testing

  • I have tested these changes locally
  • I have added/updated tests as needed
  • All tests pass (npm test)

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (if applicable)
  • My changes generate no new warnings
  • I have updated AGENTS.md if I made architectural changes

Additional Notes

Key change: Agent names can now include spaces, uppercase letters, and special characters (e.g., "My Custom Agent" or "GPT-4 Helper"), but will be stored as filesystem-safe filenames (e.g., my_custom_agent.jsonc, gpt_4_helper.jsonc). The validation now only prevents empty names and excessively long names (>100 chars).

This ensures the CLI can work seamlessly with agents created through the AI builder while maintaining filesystem compatibility across all platforms.


🤖 Generated by Claude | 2026-02-15 14:32 UTC

@github-actions
Copy link
Contributor

github-actions bot commented Feb 11, 2026

🚀 Package Preview Available!


Install this PR's preview build with npm:

npm i @base44-preview/cli@0.0.31-pr.231.dabd461

Prefer not to change any import paths? Install using npm alias so your code still imports base44:

npm i "base44@npm:@base44-preview/cli@0.0.31-pr.231.dabd461"

Or add it to your package.json dependencies:

{
  "dependencies": {
    "base44": "npm:@base44-preview/cli@0.0.31-pr.231.dabd461"
  }
}

Preview published to npm registry — try new features instantly!

@claude
Copy link

claude bot commented Feb 11, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

kfirstri
kfirstri previously approved these changes Feb 15, 2026
@github-project-automation github-project-automation bot moved this from In progress to In review in CLI Development Feb 15, 2026
Paveltarno and others added 2 commits February 15, 2026 11:48
The `^[a-z0-9_]+$` regex constraint was too restrictive — agents created
via the AI builder can have names with uppercase, dashes, etc. This
aligns the CLI with the apper-side change (base44-dev/apper#3610) so
pull works for all existing agents.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Agent names are no longer restricted to [a-z0-9_], so we need to
slugify them when creating/deleting local files on pull. The name
inside the JSON remains the source of truth.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@claude
Copy link

claude bot commented Feb 15, 2026

README check ran. 5 issue(s) found and applied: (1) Updated create description to match code, (2) Updated deploy description to include full list of resources, (3) Updated link description to match code, (4) Uncommented and added eject command row, (5) Updated logout and whoami descriptions to match code, (6) Added missing connectors push command, (7) Updated agents pull/push and entities push descriptions to match code. README.md has been updated in this branch.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@claude
Copy link

claude bot commented Feb 15, 2026

README check ran. Found 3 issues and applied fixes: (1) Added missing 'connectors push' command, (2) Uncommented 'eject' command row, (3) Updated command descriptions to match code exactly. README.md has been updated in this branch (commit pending push).

@Paveltarno Paveltarno merged commit 9e93bb1 into main Feb 15, 2026
9 checks passed
@Paveltarno Paveltarno deleted the remove-agent-name-pattern-validation branch February 15, 2026 09:57
@github-project-automation github-project-automation bot moved this from In review to Done in CLI Development Feb 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants